/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author LYS
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';
import { UploadApiResult } from '../sys/upload';
import { UploadFileParams } from '/#/axios';

const { ctxPath, adminPath } = useGlobSetting();

export interface CarddJbgz extends BasicModel<CarddJbgz> {
  jbgzRybm?: string; // 人员编码
  jbgzRymc?: string; // 人员名称
  jbgzJfjs?: number; // 缴费基数
  jbgzYlbxgryj?: number; // 养老保险个人应缴
  jbgzYlbxdwyj?: number; // 养老保险单位应缴
  jbgzYlbxxj?: number; // 养老保险小计
  jbgzSyxgryj?: number; // 失业险个人应缴
  jbgzSyxdwyj?: number; // 失业险单位应缴
  jbgzSyxxj?: number; // 失业险小计
  jbgzGsbxgryj?: number; // 工伤保险个人应缴
  jbgzGsbxdwyj?: number; // 工伤保险单位应缴
  jbgzGsbxxj?: number; // 工伤保险小计
  jbgzJbylgryj?: number; // 基本医疗个人应缴
  jbgzJbyldwyj?: number; // 基本医疗单位应缴
  jbgzJbylxj?: number; // 基本医疗小计
  jbgzDeylbzgryj?: number; // 大额医疗补助个人应缴
  jbgzDeylbzdwyj?: number; // 大额医疗补助单位应缴
  jbgzDeylbzxj?: number; // 大额医疗补助小计
  jbgzSybxgryj?: number; // 生育保险个人应缴
  jbgzSybxdwyj?: number; // 生育保险单位应缴
  jbgzSybxxj?: number; // 生育保险小计
  jbgzGryjhj?: number; // 个人应缴合计
  jbgzDwyjhj?: number; // 单位应缴合计
  jbgzHj?: number; // 合计
  jbgzQqj?: number; // 全勤奖
  jbgzDhbt?: number; // 电话补贴
  jbgzJtbt?: number; // 交通补贴
  jbgzXcbt?: number; // 洗车补贴
  jbgzWwztsbt?: number; // 无违章投诉补贴
}

export const carddJbgzList = (params?: CarddJbgz | any) =>
  defHttp.get<CarddJbgz>({ url: adminPath + '/cardd/jbgz/carddJbgz/list', params });

export const carddJbgzListData = (params?: CarddJbgz | any) =>
  defHttp.post<Page<CarddJbgz>>({ url: adminPath + '/cardd/jbgz/carddJbgz/listData', params });

export const carddJbgzForm = (params?: CarddJbgz | any) =>
  defHttp.get<CarddJbgz>({ url: adminPath + '/cardd/jbgz/carddJbgz/form', params });

export const carddJbgzSave = (params?: any, data?: CarddJbgz | any) =>
  defHttp.postJson<CarddJbgz>({ url: adminPath + '/cardd/jbgz/carddJbgz/save', params, data });

export const carddJbgzImportData = (
  params: UploadFileParams,
  onUploadProgress: (progressEvent: ProgressEvent) => void,
) =>
  defHttp.uploadFile<UploadApiResult>(
    {
      url: ctxPath + adminPath + '/cardd/jbgz/carddJbgz/importData',
      onUploadProgress,
    },
    params,
  );

export const carddJbgzDisable = (params?: CarddJbgz | any) =>
  defHttp.get<CarddJbgz>({ url: adminPath + '/cardd/jbgz/carddJbgz/disable', params });

export const carddJbgzEnable = (params?: CarddJbgz | any) =>
  defHttp.get<CarddJbgz>({ url: adminPath + '/cardd/jbgz/carddJbgz/enable', params });

export const carddJbgzDelete = (params?: CarddJbgz | any) =>
  defHttp.get<CarddJbgz>({ url: adminPath + '/cardd/jbgz/carddJbgz/delete', params });

export const distribution = (params?: CarddJbgz | any, data?: CarddJbgz | any) =>
  defHttp.postJson<CarddJbgz>({
    url: adminPath + '/cardd/jbgz/carddJbgz/distribution',
    params,
    data,
  });
